package com.cpf.controller;

import com.cpf.view.ModelRequest;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @author cpf email: cpfprogrammer@163.com
 * @date 2022/6/1 下午2:22
 */
@RestController
@RequestMapping("/model")
public class ModelNotBlank {
    @PutMapping("/minLength")
    public String min(@RequestBody @Valid ModelRequest request){
        return request.getName();
    }
}
